package com.dragon.pear.modules.trade.web.model.params.order;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * @author Chris Chan
 * Create on 2025-09-30 22:06
 * Use for: 购物车 数据排序请求参数
 * Explain:
 * 所有字段取值规则：-1 降序，0 不排序，1 升序
 */
@Schema(description = "购物车 排序参数")
public class TradeGoodsCartOrderParam {
    @Schema(description = "ID", example = "1")
    private int id;
    @Schema(description = "用户账号", example = "1")
    private int accountCode;
    @Schema(description = "商品编码", example = "1")
    private int code;
    @Schema(description = "添加到购物车时间", example = "1")
    private int time;
    @Schema(description = "商品状态", example = "1")
    private int goodsStatus;

    // 无参构造方法
    public TradeGoodsCartOrderParam() {
    }

    // 全参数构造方法
    public TradeGoodsCartOrderParam(int id, int accountCode, int code, int time, int goodsStatus) {
        this.id = id;
        this.accountCode = accountCode;
        this.code = code;
        this.time = time;
        this.goodsStatus = goodsStatus;
    }

    // 全参数create生成器
    public static TradeGoodsCartOrderParam create(int id, int accountCode, int code, int time, int goodsStatus) {
        return new TradeGoodsCartOrderParam(id, accountCode, code, time, goodsStatus);
    }

    // 全参数of生成器
    public static TradeGoodsCartOrderParam of(int id, int accountCode, int code, int time, int goodsStatus) {
        return new TradeGoodsCartOrderParam(id, accountCode, code, time, goodsStatus);
    }
    // region Getter和Setter方法
    public int getId() {
        return id;
    }

    public TradeGoodsCartOrderParam setId(int id) {
        this.id = id;
        return this;
    }

    public int getAccountCode() {
        return accountCode;
    }

    public TradeGoodsCartOrderParam setAccountCode(int accountCode) {
        this.accountCode = accountCode;
        return this;
    }

    public int getCode() {
        return code;
    }

    public TradeGoodsCartOrderParam setCode(int code) {
        this.code = code;
        return this;
    }

    public int getTime() {
        return time;
    }

    public TradeGoodsCartOrderParam setTime(int time) {
        this.time = time;
        return this;
    }

    public int getGoodsStatus() {
        return goodsStatus;
    }

    public TradeGoodsCartOrderParam setGoodsStatus(int goodsStatus) {
        this.goodsStatus = goodsStatus;
        return this;
    }

    // endregion Getter和Setter方法
}
